﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="EM.humanresources.employee._default" %>

<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<%@ Register Src="~/Common/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="~/Common/PageName.ascx" TagName="PageName" TagPrefix="uc1" %>
<%@ Register Src="~/Common/Footer.ascx" TagName="Footer" TagPrefix="uc3" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link  runat="server" id="linkCss" rel="stylesheet" href="~/css/master.css" type="text/css"/>
    <link  runat="server" id="linkcssbuttons" rel="stylesheet" href="~/css/buttons.css" type="text/css"/>
    <link id="Link1" runat="server" href="~/images/favicon.ico" rel="shortcut icon" />
    <script src="../../js/showccmm.js" type="text/javascript"></script>
    <script src="../../js/PopUp.js" type="text/javascript"></script>

    <script type="text/javascript">
        var rgMaster;

        var rgMaster;

        function GridCreated() {
            rgMaster = this;
            if (rgMaster.MasterTableView.Rows.length) {
                rgMaster.MasterTableView.SelectRow(rgMaster.MasterTableView.Rows[0].Control, true);
            }
        }
        function btnInsert_OnClick() {
            openWin('Default_edit.aspx?task=Insert&ID=-1', '', 1, 950, 700);
        }
        function btnUpdate_OnClick(ID) {
            openWin('Default_edit.aspx?task=Update&ID=' + ID, '', 1, 950, 700);
        }

        function btnDelete_OnClick(ID) {
            openWin('Default_edit.aspx?task=Delete&ID=' + ID, '', 1, 950, 700);
        }

</script>
</head>
<body>
    <form id="form1" runat="server">
        <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
            <tr>
                <td class="TdMainTop"><uc2:Header id="Header1" runat="server"></uc2:Header></td>
            </tr>
            <tr>
                <td class="TdMainContent" valign="top">
                    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="TdPageName" colspan="2"><uc1:PageName id="ucPageName" SHOWBOOKMARKBUTTON= "true" PAGEID="40" runat="server"></uc1:PageName></td>
                        </tr>
                        <tr>
                            <td id="TdMainRight" valign="top">
                                <div id="ContentRight">
                                    <div style="width:850px;" class="SearchBox">
                                        <table border="0" cellspacing="5" cellpadding="0" width="100%"> 
                                            <tr>
                                                <td style="width:40px;height:24;"><label>İsim:</label></td>
                                                <td><asp:TextBox ID="txtName" runat="server" class="Editinput" Width="150"></asp:TextBox></td>
                                                <td style="width:40px;height:24;"><label>Durum:</label></td>
                                                <td><asp:DropDownList ID="ddlStatus" runat="server" Style="width:100px;"></asp:DropDownList></td>
                                                <td align="right">
                                                    <asp:LinkButton ID="btnSearch" style="float:right;" CssClass="btn_left xp_find" runat="server" OnClick="btnSearch_Click" >
                                                        <strong class="btn_rigth_xp xp">Ara</strong>
                                                    </asp:LinkButton>
                                                </td>
                                            </tr>
                                            <tr>
                                               <%-- <td style="width:80px;"><label><asp:Label ID="lblStatus" runat="server" ></asp:Label>:</label></td>
                                                <td style="width:150px;"><asp:DropDownList ID="ddlStatus" runat="server" Width="150"></asp:DropDownList></td>--%>
                                            </tr>
                                        </table>
                                    </div>
                                    <div id="GrdDivMaster">
                                        <radG:RadGrid ID="rgMaster" runat="server" Skin="master" GridLines="None" PageSize="20" AllowPaging="True" 
                                        AllowSorting="True" Width="850" AutoGenerateColumns="False" EnableAJAX="true" ShowStatusBar="true" 
                                        OnNeedDataSource="rgMaster_NeedDataSource" OnItemDataBound="rgMaster_ItemDataBound" 
                                        LoadingTemplateTransparency="55" EnableAJAXLoadingTemplate="True" >
                                            <PagerStyle Mode="NumericPages" />
                                            <ClientSettings Selecting-AllowRowSelect="false" ></ClientSettings>
                                            <MasterTableView GridLines="None" DataKeyNames="EMPLOYEEID">
                                                <Columns>
                                                    <radG:GridBoundColumn UniqueName="EMPLOYEEID" DataField="EMPLOYEEID" Visible="false"></radG:GridBoundColumn>
                                                    <radG:GridTemplateColumn  UniqueName="Info" >
                                                        <HeaderStyle HorizontalAlign="left"  Width="10" />
                                                        <ItemStyle HorizontalAlign="left" Wrap="false" />
                                                        <ItemTemplate>
                                                            <a style="cursor:pointer" onclick='showccmm(1,<%#Eval("EMPLOYEEID") %>,0,1)' id="a1"><img id="imgInfo" src="~/images/info.gif" border="0" runat="server" /></a>
                                                        </ItemTemplate>
                                                    </radG:GridTemplateColumn>
                                                    <radG:GridBoundColumn UniqueName="FULLNAME" DataField="FULLNAME" HeaderText="Personel İsim">
                                                        <HeaderStyle HorizontalAlign="left" />
                                                        <ItemStyle HorizontalAlign="left" />
                                                    </radG:GridBoundColumn>
                                                    <radG:GridBoundColumn UniqueName="DATEOFBIRTH" DataField="DATEOFBIRTH" DataFormatString="{0 : dd.MM.yyyy }" HeaderText="Doğum Tarihi">
                                                        <HeaderStyle HorizontalAlign="left" />
                                                        <ItemStyle HorizontalAlign="left" />
                                                    </radG:GridBoundColumn>
                                                    <radG:GridBoundColumn UniqueName="DATEOFHIRE" DataField="DATEOFHIRE" DataFormatString="{0 : dd.MM.yyyy }" HeaderText="Giriş Tarihi">
                                                        <HeaderStyle HorizontalAlign="left" />
                                                        <ItemStyle HorizontalAlign="left" />
                                                    </radG:GridBoundColumn>
                                                    <radG:GridBoundColumn UniqueName="EMPSTATUS" DataField="EMPSTATUS" DataFormatString="{0 : dd.MM.yyyy }" HeaderText="Durumu">
                                                        <HeaderStyle HorizontalAlign="left" />
                                                        <ItemStyle HorizontalAlign="left" />
                                                    </radG:GridBoundColumn>
                                                    <radG:GridTemplateColumn  UniqueName="Edit" HeaderText="İşlemler">
                                                        <HeaderStyle HorizontalAlign="center"  Width="30" />
                                                        <ItemStyle HorizontalAlign="center" Wrap="false" />
                                                        <ItemTemplate>
                                                            <a href='javascript:btnUpdate_OnClick(<%#Eval("EMPLOYEEID")%>)' id="aEdit">Düzenle</a>
                                                        </ItemTemplate>
                                                    </radG:GridTemplateColumn>
                                                </Columns>                
                                            </MasterTableView>
                                        </radG:RadGrid>
                                    </div>
                                    <br />
                                    <div style="width:850px;">
                                        <a id="btnInsert" style="float:right;" class="btn_left xp_add"  onclick="btnInsert_OnClick()">
                                            <strong class="btn_rigth_xp xp">Ekle</strong>
                                        </a>
                                    </div>
                                    <br />
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="vertical-align:bottom;" class="MasterFooter"><uc3:Footer id="Footer1" runat="server"></uc3:Footer></td>
            </tr>
        </table>
        <radA:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <radA:AjaxSetting AjaxControlID="btnSearch">
                    <UpdatedControls>
                        <radA:AjaxUpdatedControl ControlID="rgMaster" />
                    </UpdatedControls>
                </radA:AjaxSetting>
            </AjaxSettings>
        </radA:RadAjaxManager>
    </form>
</body>
</html>
